using System;
using System.Collections.Generic;

namespace UnityDemo.Models
{
    public abstract class BaseFeatureDemo
    {
        protected Dictionary<int, Lazy<ISample>> _sampleCollection;

        public BaseFeatureDemo()
        {
            _sampleCollection = new Dictionary<int, Lazy<ISample>>();
            RegisterSamples();
        }

        private ISample this[int index]
        {
            get { return _sampleCollection[index].Value; }
        }

        protected abstract void RegisterSamples();

        public void DisplayAll()
        {
            foreach (var item in _sampleCollection.Values)
            {
                ISample value = item.Value;
            }
        }
    }
}